/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 */

import React from 'react';
import {
  StatusBar, SafeAreaView, StyleSheet, useColorScheme,
  View,
  Text
} from 'react-native';
import { WebView } from 'react-native-webview';

import {
  Colors,
} from 'react-native/Libraries/NewAppScreen';




function App(): React.JSX.Element {
  const isDarkMode = useColorScheme() === 'dark';

  const backgroundStyle = {
    backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
  };

  return (
    <SafeAreaView style={backgroundStyle}>
      <StatusBar
        barStyle={isDarkMode ? 'light-content' : 'dark-content'}
        backgroundColor={backgroundStyle.backgroundColor}
      />
      <View style={{ display: "flex", width: "100%", height: "100%" }} >
        <WebView source={{ uri: 'https://www.baidu.com' }} scalesPageToFit={true} style={styles.webviewContiner} />
      </View>
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  webviewContiner: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
    overflow: 'hidden'
  },
});

export default App;
